package bist.believeinstep.logic;

import java.util.List;

import bist.believeinstep.domain.Contact;
import bist.believeinstep.impl.ContactTemplate;
import bist.believeinstep.util.Util;

public class ContactService {
	private ContactTemplate contactTemplate;
	
	public ContactService(){
		contactTemplate = (ContactTemplate)Util.getConnection("contactTemplate");
	}
	
	public void create(Contact contact){
		contactTemplate.create(contact);
	}
	public void update(Contact contact){
		contactTemplate.update(contact);
	}
	public void delete(Integer id){
		contactTemplate.delete(id);
	}
	public Contact getContact(Integer id){
		return contactTemplate.getContact(id);
	}
	public List<Contact>list(){
		return contactTemplate.list();
	}
	public List<Contact> list(String name){
		return contactTemplate.list(name);
	}
}
